* some clean up and defined append function in other repo types
authorMichael Dale <dale@users.mediawiki.org>
Thu, 17 Sep 2009 19:13:23 +0000 (19:13 +0000)
committerMichael Dale <dale@users.mediawiki.org>
Thu, 17 Sep 2009 19:13:23 +0000 (19:13 +0000)
includes/filerepo/FileRepo.php
includes/filerepo/ForeignAPIRepo.php
includes/filerepo/NullRepo.php
includes/upload/UploadBase.php

index 60f4c22..c11a23f 100644 (file)
@@ -388,6 +388,8 @@ abstract class FileRepo {
         */
        abstract function storeTemp( $originalName, $srcPath );
 
+       abstract function append( $srcPath, $toAppendPath );
+       
        /**
         * Remove a temporary file or mark it for garbage collection
         * @param string $virtualUrl The virtual URL returned by storeTemp
index 0fb5097..a569fa5 100644 (file)
@@ -52,6 +52,9 @@ class ForeignAPIRepo extends FileRepo {
        function storeTemp( $originalName, $srcPath ) {
                return false;
        }
+       function append( $srcPath, $toAppendPath ){
+               return false;
+       }
        function publishBatch( $triplets, $flags = 0 ) {
                return false;
        }
index 030c336..f578498 100644 (file)
@@ -14,6 +14,9 @@ class NullRepo extends FileRepo {
        function storeTemp( $originalName, $srcPath ) {
                return false;
        }
+       function append( $srcPath, $toAppendPath ){
+               return false;
+       }
        function publishBatch( $triplets, $flags = 0 ) {
                return false;
        }
index 7f134db..09d0a37 100644 (file)
@@ -470,13 +470,13 @@ abstract class UploadBase {
         * can accumulate in the temp directory.
         *
         * @param string $saveName - the destination filename
-        * @param string $tempName - the source temporary file to save
+        * @param string $tempSrc - the source temporary file to save
         * @return string - full path the stashed file, or false on failure
         * @access private
         */
-       protected function saveTempUploadedFile( $saveName, $tempName ) {
+       protected function saveTempUploadedFile( $saveName, $tempSrc ) {
                $repo = RepoGroup::singleton()->getLocalRepo();
-               $status = $repo->storeTemp( $saveName, $tempName );
+               $status = $repo->storeTemp( $saveName, $tempSrc );
                return $status;
        }